﻿@{
    ViewData["Title"] = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@*@this.RefStyle("~/content/easyui/easyui.css")
@this.RefStyle("~/content/easyui/icon.css")*@



@using Microsoft.AspNetCore.Mvc.Localization
@inject IHtmlLocalizer<SharedResources> SharedLocalizer

<div id="appModel">
    <div style="width:18%;float:left; height:90%;overflow:auto;">
        <div style="height:10px;"></div>
        
        <ul id="orgTree" class="ztree"></ul>
        
    </div>
    <div style="width:2%;float:left;"></div>
    <div style="width:80%;float:right;">

        <div class="topPanel">
            @*<div class="toolbar">
                <div class="btn-group">
                    <a class="btn btn-primary-blue" onclick="$dh.reload()"><span class="glyphicon glyphicon-refresh"></span></a>

                </div>
                <div class="btn-group">
                    <button class="btn btn-primary-blue" v-bind:disabled="!selectedData" v-on:click="edit"><i class="fa fa-pencil-square-o"></i>@Localizer["Update"]</button>
                    <button class="btn btn-primary-blue" v-bind:disabled="!selectedData" v-on:click="del"><i class="fa fa-trash-o"></i>@Localizer["Delete"]</button>
                    <button class="btn btn-primary-blue" v-on:click="add"><i class="fa fa-plus"></i>@Localizer["Add"]</button>
                </div>
            </div>*@
            <div class="search">
                <table>
                    <tr>
                        <td>
                            <div class="input-group">
                                <input id="txt_keyword" type="text" class="form-control" placeholder="@Localizer["UserPlaceHolder"]" style="width: 260px;" v-model="queryKey">
                                <span class="input-group-btn">
                                    <button id="btn_search" type="button" class="btn  btn-primary-blue" v-on:click="search"><i class="fa fa-search"></i></button>
                                </span>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div id="toolbar">
            <div class="btn-group">
                @*<a class="btn btn-default" onclick="$dh.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
                <button class="btn btn-default" v-bind:disabled="!selectedData" v-on:click="edit"><i class="fa fa-pencil-square-o"></i>@SharedLocalizer["Update"]</button>
                <button class="btn btn-default" v-bind:disabled="!selectedData" v-on:click="del"><i class="fa fa-trash-o"></i>@SharedLocalizer["Delete"]</button>
                <button class="btn btn-default" v-on:click="add"><i class="fa fa-plus"></i>@SharedLocalizer["Add"]</button>*@
                @await Html.PartialAsync("_Partical_Button")
            </div>


        </div>
        <div class="table-responsive" style="width:100%">
            <table class="table table-no-bordered "  id="tb_users">
                
            </table>
        </div>


        <modal-dialog  v-show="showDialog" :title="modalTitle" :entity="entityObj" :btnclose="btnClose" :btnsubmit="btnSubmit">
            <div slot="modal-body">
               
                <form id="form1">
                    <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
                        <div style=" margin-right: 30px;">
                            <table class="form">
                             
                                <tr>
                                    <td class="formTitle">账号</td>
                                    <td class="formValue">
                                        <input id="account" name="account" type="text" class="form-control required" placeholder="请输入账号" v-model="entityObj.DH_Account" />
                                    </td>
                                    <td class="formTitle">性别</td>
                                    <td class="formValue">
                                        <input type="radio" id="one" value="true" v-model="entityObj.DH_Gender">
                                        <label for="one">男</label>
                                        <input type="radio" id="two" value="false" v-model="entityObj.DH_Gender">
                                        <label for="two">女</label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="formTitle">实名</td>
                                    <td class="formValue">
                                        <input id="userName" name="userName" type="text" class="form-control" placeholder="请输入姓名" v-model="entityObj.DH_RealName" />
                                    </td>
                                    <td class="formTitle">昵称</td>
                                    <td class="formValue">
                                        <input id="nickName" name="nickName" type="text" class="form-control" placeholder="请输入昵称" v-model="entityObj.DH_NickName" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="formTitle">出生日期</td>
                                    <td class="formValue">
                                        <input id="userBirthday" name="userBirthday" type="text" class="form-control input-wdatepicker" onfocus="choseDate();"   v-model="entityObj.Birthday" />
                                    </td>
                                    <td class="formTitle">手机号</td>
                                    <td>
                                        <input id="userMobilePhone" name="userMobilePhone" type="text" class="form-control" placeholder="请输入手机号" v-model="entityObj.DH_MobilePhone" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="formTitle">邮箱</td>
                                    <td class="formValue">
                                        <input id="userEmail" name="userEmail" type="text" class="form-control" v-model="entityObj.DH_Email" />
                                    </td>
                                    <td class="formTitle">微信</td>
                                    <td>
                                        <input id="userWeChat" name="userWeChat" type="text" class="form-control" placeholder="请输入微信号" v-model="entityObj.DH_WeChat" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="formTitle">签名</td>
                                    <td class="formValue">
                                        <input id="userSignature" name="userSignature" type="text" class="form-control" v-model="entityObj.DH_Signature" />
                                    </td>
                                    <td class="formTitle">所属机构</td>
                                    <td>
                                        
                                        <input id="Organizations" type="text" class="form-control" v-model="entityObj.Organizations" />
                                        <input id="OrganizationIds" type="hidden" class="form-control" v-model="entityObj.OrganizationIds" />
                                        <div id="menuContent" class="menuContent" style="display: none;">
                                            <ul id="userOrg" class="ztree"></ul>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">选项</th>
                                    <td class="formValue" colspan="3"  style="padding-top:1px;">
                                        <div class="ckbox">
                                            <input id="F_EnabledMark" name="F_EnabledMark" type="checkbox" v-model="entityObj.DH_EnableMark"><label for="F_EnabledMark">是否启用</label>
                                        </div>
                                        <div class="ckbox">
                                            <input id="F_DeleteMark" name="F_DeleteMark" type="checkbox" v-model="entityObj.DH_DeleteMark"><label for="F_DeleteMark">是否删除</label>
                                        </div>
                                    </td>
                                    

                                </tr>


                                <tr>
                                    <td class="formTitle" valign="top" style="padding-top: 5px;">
                                        备注
                                    </td>
                                    <td class="formValue" colspan="3">
                                        <textarea id="Description" name="Description" class="form-control" style="height: 60px;" v-model="entityObj.DH_Description"></textarea>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </form>
            </div>
            
        </modal-dialog>
    </div>
</div>



@this.RefScript("~/content/js/base.js")
<script type="text/javascript" >
    var _getTreeDataUrl = "@this.Href("~/Organize/TreeData")";
    var _getTableListUrl = "@this.Href("~/User/Users")";
    var _updateModelUrl = "@this.Href("~/User/Add")";
    var _deleteModelUrl = "@this.Href("~/User/Delete")";
    var _enabledUserUrl = "@this.Href("~/User/EnabledUser")";
    var _disabledUserUrl = "@this.Href("~/User/DisabledUser")";
    var _checkUserIdExistedUrl = "@this.Href("~/User/CheckUserExisted")";
    var _userOrgTree;
    var _deleteRemand = "@Localizer["DeleteConfirm"]";
    var _enabledStr = "@SharedLocalizer["Enabled"]";
    var _disabledStr = "@SharedLocalizer["Disabled"]";
    
</script>
<script src="~/js/Views/User/Index.js"></script>
<script src="~/lib/bootstrap-table/dist/extensions/export/bootstrap-table-export.js"></script>
<script src="~/content/tableExport/tableExport.js"></script>



